﻿using System;

namespace Array
{
    class Program
    {
        static void Main(string[] args)
        {

            //一维数组
            int[] arr = new int[5] { 1, 2, 3, 4, 5 };

            for (int i = 0; i < arr.Length; i++)
            {
                Console.WriteLine(arr[i]);
            }



            int[] arr1 = new int[5];//无实例化，输出结果为5个0

            for (int j = 0; j < arr1.Length; j++)
            {
                Console.WriteLine(arr1[j]);
            }

            //二维数组
            int[,] arr2 = new int[3, 3]//三行三列
                {
                    //0//1//2
                    { 1,2,3},//0
                    { 10,20,30},//1
                    {100,200,300 }//2
                };
            Console.WriteLine(arr2[2, 0]);
        }
    }
}
